<?php
namespace Admin\Model;
use Think\Model;
class UserModel extends Model {
    //会员界面拼接
    function userHtml($data,$custom_checked)
    {
        $thstr = '<thead><tr>';
        foreach ($custom_checked as $_checked) {
            $thstr .= '<th>' . $_checked . '</th>';
        }
        $thstr .= '</tr></thead>';
        $trstr = "";
        foreach ($data as $k => $v) {
            $trstr .= "<tr>";
            foreach ($custom_checked as $key => $_checked) {
                    $trstr .= '<td>' . ($v[$key] ? $v[$key] : "") . '</td>';

            }

            $trstr .= '</tr>';
        }
        $trstr .= '</tbody>';

        $html = $thstr . $trstr;
        return $html;
    }



    function abroadListHtml($data,$custom_checked)
    {
        $thstr = '<thead><tr>';
        foreach ($custom_checked as $_checked) {
            $thstr .= '<th>' . $_checked . '</th>';
        }
        $thstr .= '</tr></thead>';
        $trstr = "";
        foreach ($data as $k => $v) {
            $trstr .= "<tr>";
            foreach ($custom_checked as $key => $_checked) {
                $trstr .= '<td>' . ($v[$key] ? $v[$key] : "") . '</td>';

            }

            $trstr .= '</tr>';
        }
        $trstr .= '</tbody>';

        $html = $thstr . $trstr;
        return $html;
    }
}